<?php
require __DIR__ . '/../../vendor/autoload.php';


$queue = new \SuperTool\FileQueue([
	'databaseRoot' => './file-queue/test'
]);

$i = 1000;
$pid = getmypid();
while ($i) {
	if (($d = $queue->pop('ceshi')) !== false) {
		echo  "[$pid] $d\n";
		$i--;
	}
}

echo "[$pid] done\n";